<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Javascript 变量</title>
</head>
<body>
<h1>Value = undefined</h1>

<p>如果变量声明时没有赋值，那么其值是 undefined。</p>

<p id="demo"></p>

<script>
  var carName;
  document.getElementById("demo").innerHTML = carName;
</script>

</body>
</html>